package com.ishansong.ticket.model;

import com.ishansong.base.springjdbc.PrimaryKey;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by saiyin on 15/9/19.
 * 工单操作记录
 */
@Entity
@Table(name = "ticket_records")
public class TicketRecord implements Serializable {
    private static final long serialVersionUID = 1L;
    //主键id
    private Long id;
    // 操作人
    private String operatorId;
    // 工单id
    private Long ticketId;
    // 工单状态
    private Integer status;
    // 创建时间
    private Date createTime;
    // 备注
    private String remark;
    @Id
    @Column(name = "id", unique = true, nullable = false)
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "operator_id")
    public String getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    @Column(name = "ticket_id")
    public Long getTicketId() {
        return ticketId;
    }

    public void setTicketId(Long ticketId) {
        this.ticketId = ticketId;
    }

    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "TicketRecord{" +
                "id=" + id +
                ", operatorId='" + operatorId + '\'' +
                ", ticketId=" + ticketId +
                ", status=" + status +
                ", createTime=" + createTime +
                ", remark='" + remark + '\'' +
                '}';
    }
}
